<%@page import="cn.com.entity.Consumer"%>
<%@page import="cn.com.dao.ConsumerDao"%>
<%@page import="cn.com.entity.Doctor"%>
<%@page import="cn.com.dao.DoctorDao"%>
<%@page import="cn.com.entity.Departments"%>
<%@page import="cn.com.dao.DepartmentsDao"%>
<%@page import="cn.com.entity.Registerform"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">		
a:visited {
	text-decoration: none;
	color: #03C;
}
a:hover {
	text-decoration: none;
	color: #69C;
}
a:active {
	text-decoration: none;
}
a:link {
	
	text-decoration: none;
}
body{
	color: #03C;
	font-size: 20px;
}
</style>
</head>
<body>
<h2 align="center">用户挂号单</h2>
<table border="1" align="center" width="60%">
	<tr>
		<td>预约挂号单序号</td>
		<td>挂号用户姓名</td>
		<td>挂号用户性别</td>
		<td>挂号用户年龄</td>
	</tr>
<%
if(session.getAttribute("doctor")!=null){
if(session.getAttribute("rfbydoctoridlist")!=null){
	List<Registerform> list=(List<Registerform>)session.getAttribute("rfbydoctoridlist");
	
	for(int i=0;i<list.size();i++){
		Registerform rf=list.get(i);
		int consumerid=rf.getConsumerid();
		ConsumerDao cd=new ConsumerDao();
		Consumer consumer=new Consumer();
		consumer.setConsumerid(consumerid);
		Consumer c=cd.selectOneConsumer(consumer);	
%>	
	<tr>
		<td><%=i+1 %></td>
		<td><%=c.getRealname() %></td>
		<td><%=c.getConsumersex() %></td>
		<td><%=c.getConsumerage() %></td>
	</tr>
<%
		} 
	}
}%>	
</table>

</body>
</html>